package mybatis;

import mybatis.config.AppConfig;
import mybatis.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author zhangzg
 * @date 2023/4/4
 */
public class Test {

    public static void main(String[] args) {

        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
        context.register(AppConfig.class);
        context.refresh();
        UserService userService = context.getBean("userService", UserService.class);
        System.out.println(userService.testUserDao());

    }

}
